<template>
  <div class="greenBox">
    <div>{{count}}</div>
    <div>
      <button @click="greenAdd()">绿色盒子的点击</button>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      count: 0,
      user: {
        name: 'green',
        age: 18
      }
    }
  },
  methods: {
    greenAdd () {
      this.count++;
      this.$emit('fn1', this.user)
      // this.$parent.appAdd(this.user);
    }
  }

}
</script>

<style lang="less" scoped>
.greenBox {
  height: 200px;
  background-color: green;
  flex: 1;
}
</style>